Class Collision.Probe
Represents a collision probe in the game world.
Provides collision information from a reference world position.
Functions
Probe(pos[, roomNumber]) | Create a Probe at a specified world position in a room. |
Probe(pos, roomNumber, dir, dist) | Create a Probe that casts from an origin world position in a room in a given direction for a specified distance. |
Probe(pos, roomNumber, rot, dist) | Create a Probe that casts from an origin world position in a room in the direction of a given rotation for a specified distance. |
Probe(pos, roomNumber, rot, relOffset) | Create a Probe that casts from an origin world position, where a given relative offset is rotated according to a given rotation. |
GetPosition() | Get the world position of this Probe. |
GetRoom() | Get the Room object of this Probe. |
GetRoomName() | Get the room name of this Probe. |
GetFloorHeight() | Get the floor height at this Probe. |
GetCeilingHeight() | Get the ceiling height at this Probe. |
GetWaterSurfaceHeight() | Get the water surface height at this Probe. |
GetFloorNormal() | Get the normal of the floor at this Probe. |
GetCeilingNormal() | Get the normal of the ceiling at this Probe. |
GetFloorMaterialType() | Get the material type of the floor at this Probe. |
GetCeilingMaterialType() | Get the material type of the ceiling at this Probe. |
IsSteepFloor() | Check if the floor at this Probe is steep. |
IsSteepCeiling() | Check if the ceiling at this Probe is steep. |
IsWall() | Check if the Probe is inside a wall. |
IsInsideSolidGeometry() | Check if this Probe is inside solid geometry (below a floor, above a ceiling, inside a bridge, or inside a wall). |
IsClimbableWall(headingAngle) | Check if there is a climbable wall in the given heading angle at this Probe. |
IsMonkeySwing() | Check if there is a monkey swing sector at this Probe. |
IsDeath() | Check if there is a death sector at this Probe. |
Preview() | Preview this Probe in the Collision Stats debug page. |
Functions
- Probe(pos[, roomNumber])
-
Create a Probe at a specified world position in a room.
Parameters:
- pos Vec3 World position.
- roomNumber int Room number. Must be used if probing a position in an overlapping room. (optional)
Returns:
-
Probe
A new Probe.
- Probe(pos, roomNumber, dir, dist)
-
Create a Probe that casts from an origin world position in a room in a given direction for a specified distance.
Required to correctly traverse between rooms.
Parameters:
- pos Vec3 Origin world position to cast from.
- roomNumber int Origin room number.
- dir Vec3 Direction in which to cast.
- dist float Distance to cast.
Returns:
-
Probe
A new Probe.
- Probe(pos, roomNumber, rot, dist)
-
Create a Probe that casts from an origin world position in a room in the direction of a given rotation for a specified distance.
Required to correctly traverse between rooms.
Parameters:
- pos Vec3 Origin world position to cast from.
- roomNumber int Origin room number.
- rot Rotation Rotation defining the direction in which to cast.
- dist float Distance to cast.
Returns:
-
Probe
A new Probe.
- Probe(pos, roomNumber, rot, relOffset)
-
Create a Probe that casts from an origin world position, where a given relative offset is rotated according to a given rotation.
Required to correctly traverse between rooms.
Parameters:
- pos Vec3 Origin world position to cast from.
- roomNumber int Origin room number.
- rot Rotation Rotation according to which the input relative offset is rotated.
- relOffset Vec3 Relative offset to cast.
Returns:
-
Probe
A new Probe.
- GetPosition()
-
Get the world position of this Probe.
Returns:
-
Vec3
World position.
- GetRoom()
-
Get the Room object of this Probe.
Returns:
-
Room
Room object.
- GetRoomName()
-
Get the room name of this Probe.
Returns:
-
string
Room name.
- GetFloorHeight()
-
Get the floor height at this Probe.
Returns:
-
int
Floor height. nil: no floor exists
- GetCeilingHeight()
-
Get the ceiling height at this Probe.
Returns:
-
int
Ceiling height. nil: no ceiling exists
- GetWaterSurfaceHeight()
-
Get the water surface height at this Probe.
Returns:
-
int
Water surface height. nil: no water surface exists
- GetFloorNormal()
-
Get the normal of the floor at this Probe.
Returns:
-
Vec3
Floor normal. nil: no floor exists
- GetCeilingNormal()
-
Get the normal of the ceiling at this Probe.
Returns:
-
Vec3
Ceiling normal. nil: no ceiling exists
- GetFloorMaterialType()
-
Get the material type of the floor at this Probe.
Returns:
-
MaterialType
Floor material type. nil: no floor exists
- GetCeilingMaterialType()
-
Get the material type of the ceiling at this Probe.
Returns:
-
MaterialType
Ceiling material type. nil: no ceiling exists
- IsSteepFloor()
-
Check if the floor at this Probe is steep.
Returns:
-
bool
Steep floor status. true: is a steep floor, false: isn't a steep floor, nil: no floor exists
- IsSteepCeiling()
-
Check if the ceiling at this Probe is steep.
Returns:
-
bool
Steep ceiling status. true: is a steep ceiling, false: isn't a steep ceiling, nil: no ceiling exists
- IsWall()
-
Check if the Probe is inside a wall. Can be used to determine if a wall and ceiling exist.
Returns:
-
bool
Wall status. true: is a wall, false: isn't a wall
- IsInsideSolidGeometry()
-
Check if this Probe is inside solid geometry (below a floor, above a ceiling, inside a bridge, or inside a wall).
Returns:
-
bool
Inside geometry status. true: is inside, false: is outside
- IsClimbableWall(headingAngle)
-
Check if there is a climbable wall in the given heading angle at this Probe.
Parameters:
- headingAngle float Heading angle at which to check for a climbable wall.
Returns:
-
bool
Climbable wall status. true: is climbable wall, false: isn't climbable
- IsMonkeySwing()
-
Check if there is a monkey swing sector at this Probe.
Returns:
-
bool
Monkey swing sector status. true: is a monkey swing, false: isn't a monkey swing
- IsDeath()
-
Check if there is a death sector at this Probe.
Returns:
-
bool
Death sector status. true: is a death sector, false: isn't a death sector
- Preview()
- Preview this Probe in the Collision Stats debug page.